package com.bestcem.xm.member.dao.mapper;

import com.bestcem.xm.member.entity.mysql.ImportRecordMsgEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 导入记录mapper
 *
 * @author yf.wang <yf.wang@idiaoyan.com>
 * @version V1.0
 * @date 2021/9/15
 */
@Mapper
public interface ImportRecordMsgMapper {

    /**
     * 根据导入记录id 统计改记录的错误条数
     *
     * @param importRecordId
     * @return
     */
    Integer countByImportRecordId(@Param("importRecordId") String importRecordId);

    /**
     * 根据导入记录id 获取记录的错误列表
     *
     * @param importRecordId
     * @param start
     * @param size
     * @return
     */
    List<ImportRecordMsgEntity> findPageByImportRecordId(@Param("importRecordId") String importRecordId,
                                                         @Param("start") int start,
                                                         @Param("size") Integer size);

    /**
     * 批量创建错误信息
     *
     * @param msgDoList
     */
    void batchCreateImportRecordMsg(@Param("msgList") List<ImportRecordMsgEntity> msgDoList);

    /**
     * 创建
     *
     * @param importRecordMsgEntity
     */
    void createImportRecordMsg(ImportRecordMsgEntity importRecordMsgEntity);
}
